package com.asiainfo.dacp.datastash.broker.core.enums;

/**
 *
 *
 * @author MeiKefu
 * @date 2017-12-13
 */
public enum ErrorCodeEnum {

    UnitDefNull(10001,"获取VM的StashUnitDefine为空"),
    UnitProcIdNull(10002,"通过unit的执行号获取执行日志为空"),
    CONFIG_ERROR(10003, "您提供的配置存在错误信息，请检查 ."),

    RETRY_FAIL(10004, "方法调用多次仍旧失败 ."),
    RUNTIME_ERROR(10005, "运行时内部调用错误 ."),
    HOOK_INTERNAL_ERROR(10006, "Hook运行错误 ."),
    WAIT_TIME_EXCEED(10007, "等待时间超出范围"),
    TASK_HUNG_EXPIRED(10008, "任务hung住，Expired")
    ;

    private int errCode;
    private String errMessage;

    ErrorCodeEnum(int errCode, String errMessage){
        this.errCode=errCode;
        this.errMessage=errMessage;
    }

    public int getErrCode() {
        return errCode;
    }

    public String getErrMessage(){
        return errMessage;
    }

    public String toString(){
        return String.format("%s - %s",errCode,errMessage);
    }
}
